<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Anonymous function</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Anonymous_function"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Anonymous_function rootpage-Anonymous_function skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Anonymous function</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>In <a href="Computer_programming" title="Computer programming">computer programming</a>, an <b>anonymous function</b> (<b>function literal</b>, <b>expression</b> or <b>block</b>) is a <a href="Function_(computer_science)" class="mw-redirect" title="Function (computer science)">function</a> definition that is not <a href="Name_binding" title="Name binding">bound</a> to an <a href="Name_(computer_science)" class="mw-redirect" title="Name (computer science)">identifier</a>. Anonymous functions are often arguments being passed to <a href="Higher-order_function" title="Higher-order function">higher-order functions</a> or used for constructing the result of a higher-order function that needs to return a function.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
If the function is only used once, or a limited number of times, an anonymous function may be syntactically lighter than using a named function. Anonymous functions are ubiquitous in <a href="Functional_programming_language" class="mw-redirect" title="Functional programming language">functional programming languages</a> and other languages with <a href="First-class_function" title="First-class function">first-class functions</a>, where they fulfil the same role for the <a href="Function_type" title="Function type">function type</a> as <a href="Literal_(computer_programming)" title="Literal (computer programming)">literals</a> do for other <a href="Data_type" title="Data type">data types</a>.
</p><p>Anonymous functions originate in the work of <a href="Alonzo_Church" title="Alonzo Church">Alonzo Church</a> in his invention of the <a href="Lambda_calculus" title="Lambda calculus">lambda calculus</a>, in which all functions are anonymous, in 1936, before electronic computers.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> In several programming languages, anonymous functions are introduced using the keyword <i>lambda</i>, and anonymous functions are often referred to as <b>lambdas</b> or <b>lambda abstractions</b>. Anonymous functions have been a feature of <a href="Programming_language" title="Programming language">programming languages</a> since <a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a> in 1958, and a growing number of modern programming languages support anonymous functions.
</p>
<style data-mw-deduplicate="TemplateStyles:r886046785">
/* start https://en.wikipedia.org/ */
.mw-parser-output .toclimit-2 .toclevel-1 ul,.mw-parser-output .toclimit-3 .toclevel-2 ul,.mw-parser-output .toclimit-4 .toclevel-3 ul,.mw-parser-output .toclimit-5 .toclevel-4 ul,.mw-parser-output .toclimit-6 .toclevel-5 ul,.mw-parser-output .toclimit-7 .toclevel-6 ul{display:none}
/* end https://en.wikipedia.org/ */
</style><div class="toclimit-3"><meta property="mw:PageProp/toc"></div>
<div class="mw-heading mw-heading2"><h2 id="Names">Names</h2></div>
<p>The names "lambda abstraction", "lambda function", and "lambda expression" refer to the notation of function abstraction in lambda calculus, where the usual function <span class="texhtml"><span style="padding-right:0.15em;"><i>f</i></span>(<i>x</i>) = <i>M</i></span> would be written <span class="texhtml">(λ<i>x</i>.<span style="padding-right:0.15em;"><i>M</i></span>)</span>, and where <span class="texhtml mvar" style="font-style:italic;">M</span> is an expression that uses <span class="texhtml mvar" style="font-style:italic;">x</span>. Compare to the Python syntax of <code class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">M</span></code>.
</p><p>The name "arrow function" refers to the mathematical "<a href="Maplet" class="mw-redirect" title="Maplet">maps to</a>" symbol, <span class="texhtml"><i>x</i> ↦ <i>M</i></span>. Compare to the JavaScript syntax of <code class="mw-highlight mw-highlight-lang-js mw-content-ltr" dir="ltr"><span class="nx">x</span><span class="w"> </span><span class="p">=></span><span class="w"> </span><span class="nx">M</span></code>.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Uses">Uses</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p>Anonymous functions can encapsulate functionality that does not require naming and is intended for short-term or localized use. Some notable examples include <a href="Closure_(computer_science)" class="mw-redirect" title="Closure (computer science)">closures</a> and <a href="Currying" title="Currying">currying</a>.
</p><p>The use of anonymous functions is a matter of style. Using them is never the only way to solve a problem; each anonymous function could instead be defined as a named function and called by name. Anonymous functions often provide a briefer notation than defining named functions. In languages that do not permit the definition of named functions in local scopes, anonymous functions may provide encapsulation via localized scope, however the code in the body of such anonymous function may not be re-usable, or amenable to separate testing. Short/simple anonymous functions used in expressions may be easier to read and understand than separately defined named functions, though lacking a <a href="Naming_convention_(programming)" title="Naming convention (programming)">descriptive name</a> may reduce code readability.
</p><p>In some programming languages, anonymous functions are commonly implemented for very specific purposes such as binding events to callbacks or instantiating the function for particular values, which may be more efficient in a <a href="Dynamic_programming_language" title="Dynamic programming language">Dynamic programming language</a>, more readable, and less error-prone than calling a named function.
</p><p>The following examples are written in Python 3.
</p>
<div class="mw-heading mw-heading3"><h3 id="Sorting">Sorting</h3></div>
<p>When attempting to sort in a non-standard way, it may be easier to contain the sorting logic as an anonymous function instead of creating a named function.
Most languages provide a generic sort function that implements a <a href="Sort_algorithm" class="mw-redirect" title="Sort algorithm">sort algorithm</a> that will sort arbitrary objects.
This function usually accepts an arbitrary function that determines how to compare whether two elements are equal or if one is greater or less than the other.
</p><p>Consider this Python code sorting a list of strings by length of the string:
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'house'</span><span class="p">,</span> <span class="s1">'car'</span><span class="p">,</span> <span class="s1">'bike'</span><span class="p">]</span>
<span class="o">>>></span> <span class="n">a</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">))</span>
<span class="o">>>></span> <span class="n">a</span>
<span class="p">[</span><span class="s1">'car'</span><span class="p">,</span> <span class="s1">'bike'</span><span class="p">,</span> <span class="s1">'house'</span><span class="p">]</span>
</pre></div>
<p>The anonymous function in this example is the lambda expression:
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
</pre></div>
<p>The anonymous function accepts one argument, <code>x</code>, and returns the length of its argument, which is then used by the <code>sort()</code> method as the criteria for sorting.
</p><p>Basic syntax of a lambda function in Python is
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="k">lambda</span> <span class="n">arg1</span><span class="p">,</span> <span class="n">arg2</span><span class="p">,</span> <span class="n">arg3</span><span class="p">,</span> <span class="o">...</span><span class="p">:</span> <span class="o"><</span><span class="n">operation</span> <span class="n">on</span> <span class="n">the</span> <span class="n">arguments</span> <span class="n">returning</span> <span class="n">a</span> <span class="n">value</span><span class="o">></span>
</pre></div>
<p>The expression returned by the lambda function can be assigned to a variable and used in the code at multiple places.
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">add</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">a</span><span class="p">:</span> <span class="n">a</span> <span class="o">+</span> <span class="n">a</span>
<span class="o">>>></span> <span class="n">add</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span>
<span class="mi">40</span>
</pre></div>
<p>Another example would be sorting items in a list by the name of their class (in Python, everything has a class):
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">10</span><span class="p">,</span> <span class="s1">'number'</span><span class="p">,</span> <span class="mf">11.2</span><span class="p">]</span>
<span class="o">>>></span> <span class="n">a</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">a</span>
<span class="p">[</span><span class="mf">11.2</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="s1">'number'</span><span class="p">]</span>
</pre></div>
<p>Note that <code>11.2</code> has class name "<code>float</code>", <code>10</code> has class name "<code>int</code>", and <code>'number'</code> has class name "<code>str</code>". The sorted order is "<code>float</code>", "<code>int</code>", then "<code>str</code>".
</p>
<div class="mw-heading mw-heading3"><h3 id="Closures">Closures</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Closure_(computer_programming)" title="Closure (computer programming)">Closure (computer programming)</a></div>
<p>Closures are functions evaluated in an environment containing <a href="Bound_variable" class="mw-redirect" title="Bound variable">bound variables</a>. The following example binds the variable "threshold" within an anonymous function that compares input values to this threshold.
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="k">def</span><span class="w"> </span><span class="nf">comp</span><span class="p">(</span><span class="n">threshold</span><span class="p">):</span>
<span class="k">return</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o"><</span> <span class="n">threshold</span>
</pre></div>
<p>This can be used as a sort of generator of comparison functions:
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">func_a</span> <span class="o">=</span> <span class="n">comp</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">func_b</span> <span class="o">=</span> <span class="n">comp</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span>
<span class="o">>>></span> <span class="nb">print</span><span class="p">(</span><span class="n">func_a</span><span class="p">(</span><span class="mi">5</span><span class="p">),</span> <span class="n">func_a</span><span class="p">(</span><span class="mi">8</span><span class="p">),</span> <span class="n">func_a</span><span class="p">(</span><span class="mi">13</span><span class="p">),</span> <span class="n">func_a</span><span class="p">(</span><span class="mi">21</span><span class="p">))</span>
<span class="kc">True</span> <span class="kc">True</span> <span class="kc">False</span> <span class="kc">False</span>
<span class="o">>>></span> <span class="nb">print</span><span class="p">(</span><span class="n">func_b</span><span class="p">(</span><span class="mi">5</span><span class="p">),</span> <span class="n">func_b</span><span class="p">(</span><span class="mi">8</span><span class="p">),</span> <span class="n">func_b</span><span class="p">(</span><span class="mi">13</span><span class="p">),</span> <span class="n">func_b</span><span class="p">(</span><span class="mi">21</span><span class="p">))</span>
<span class="kc">True</span> <span class="kc">True</span> <span class="kc">True</span> <span class="kc">False</span>
</pre></div>
<p>It would be impractical to create a function for every possible comparison function and may be too inconvenient to keep the threshold around for further use. Regardless of the reason why a closure is used, the anonymous function is the entity that contains the functionality that does the comparing.
</p>
<div class="mw-heading mw-heading3"><h3 id="Currying">Currying</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Currying" title="Currying">currying</a></div>
<p>Currying transforms a function that takes multiple arguments into a sequence of functions each accepting a single argument. In this example, a function that performs <a href="Integer_division" class="mw-redirect" title="Integer division">division</a> by any integer is transformed into one that performs division by a set integer.
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="k">def</span><span class="w"> </span><span class="nf">divide</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">):</span>
<span class="o">...</span> <span class="k">return</span> <span class="n">x</span> <span class="o">/</span> <span class="n">y</span>
<span class="o">>>></span> <span class="k">def</span><span class="w"> </span><span class="nf">divisor</span><span class="p">(</span><span class="n">d</span><span class="p">):</span>
<span class="o">...</span> <span class="k">return</span> <span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">divide</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">d</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">half</span> <span class="o">=</span> <span class="n">divisor</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
<span class="o">>>></span> <span class="n">third</span> <span class="o">=</span> <span class="n">divisor</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="o">>>></span> <span class="nb">print</span><span class="p">(</span><span class="n">half</span><span class="p">(</span><span class="mi">32</span><span class="p">),</span> <span class="n">third</span><span class="p">(</span><span class="mi">32</span><span class="p">))</span>
<span class="mf">16.0</span> <span class="mf">10.666666666666666</span>
<span class="o">>>></span> <span class="nb">print</span><span class="p">(</span><span class="n">half</span><span class="p">(</span><span class="mi">40</span><span class="p">),</span> <span class="n">third</span><span class="p">(</span><span class="mi">40</span><span class="p">))</span>
<span class="mf">20.0</span> <span class="mf">13.333333333333334</span>
</pre></div>
<p>While the use of anonymous functions is perhaps not common with currying, it still can be used. In the above example, the function divisor generates functions with a specified divisor. The functions half and third curry the divide function with a fixed divisor.
</p><p>The divisor function also forms a closure by binding the variable <code>d</code>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Higher-order_functions">Higher-order functions</h3></div>
<p>A <a href="Higher-order_function" title="Higher-order function">higher-order function</a> is a function that takes a function as an argument or returns one as a result. This technique is frequently employed to tailor the behavior of a generically defined function, such as a loop or recursion pattern. Anonymous functions are a convenient way to specify such function arguments. The following examples are in Python 3.
</p>
<div class="mw-heading mw-heading4"><h4 id="Map">Map</h4></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Map_(higher-order_function)" title="Map (higher-order function)">Map (higher-order function)</a></div>
<p>The map function performs a function call on each element of a list. The following example <a href="Square_(algebra)" title="Square (algebra)">squares</a> every element in an array with an anonymous function.
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
<span class="o">>>></span> <span class="nb">list</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">*</span> <span class="n">x</span><span class="p">,</span> <span class="n">a</span><span class="p">))</span>
<span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="mi">36</span><span class="p">]</span>
</pre></div>
<p>The anonymous function takes an argument and returns its square. The above form is discouraged by the creators of the language, who maintain that the form presented below has the same meaning and is more aligned with the philosophy of the language:
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
<span class="o">>>></span> <span class="p">[</span><span class="n">x</span> <span class="o">*</span> <span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">a</span><span class="p">]</span>
<span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">16</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="mi">36</span><span class="p">]</span>
</pre></div>
<div class="mw-heading mw-heading4"><h4 id="Filter">Filter</h4></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Filter_(higher-order_function)" title="Filter (higher-order function)">Filter (higher-order function)</a></div>
<p>The filter function returns all elements from a list that evaluate True when passed to a certain function.
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
<span class="o">>>></span> <span class="nb">list</span><span class="p">(</span><span class="nb">filter</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">0</span><span class="p">,</span> <span class="n">a</span><span class="p">))</span>
<span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
</pre></div>
<p>The anonymous function checks if the argument passed to it is even. The same as with map, the form below is considered more appropriate:
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
<span class="o">>>></span> <span class="p">[</span><span class="n">x</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">a</span> <span class="k">if</span> <span class="n">x</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">0</span><span class="p">]</span>
<span class="p">[</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">6</span><span class="p">]</span>
</pre></div>
<div class="mw-heading mw-heading4"><h4 id="Fold">Fold</h4></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Fold_(higher-order_function)" title="Fold (higher-order function)">Fold (higher-order function)</a></div>
<p>A fold function runs over all elements in a structure (for lists usually left-to-right, a "left fold", called <code>reduce</code> in Python), accumulating a value as it goes. This can be used to combine all elements of a structure into one value, for example:
</p>
<div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span class="o">>>></span> <span class="kn">from</span><span class="w"> </span><span class="nn">functools</span><span class="w"> </span><span class="kn">import</span> <span class="n">reduce</span>
<span class="o">>>></span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">]</span>
<span class="o">>>></span> <span class="n">reduce</span><span class="p">(</span><span class="k">lambda</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">:</span> <span class="n">x</span> <span class="o">*</span> <span class="n">y</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
<span class="mi">120</span>
</pre></div>
<p>This performs
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \left(\left(\left(1\times 2\right)\times 3\right)\times 4\right)\times 5=120.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow>
<mo>(</mo>
<mrow>
<mrow>
<mo>(</mo>
<mrow>
<mrow>
<mo>(</mo>
<mrow>
<mn>1</mn>
<mo>×<!-- × --></mo>
<mn>2</mn>
</mrow>
<mo>)</mo>
</mrow>
<mo>×<!-- × --></mo>
<mn>3</mn>
</mrow>
<mo>)</mo>
</mrow>
<mo>×<!-- × --></mo>
<mn>4</mn>
</mrow>
<mo>)</mo>
</mrow>
<mo>×<!-- × --></mo>
<mn>5</mn>
<mo>=</mo>
<mn>120.</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \left(\left(\left(1\times 2\right)\times 3\right)\times 4\right)\times 5=120.}</annotation>
</semantics>
</math></span><img src="./669852536413e995d8ea3b87780f33f5d526f211.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:29.834ex; height:2.843ex;" alt="{\displaystyle \left(\left(\left(1\times 2\right)\times 3\right)\times 4\right)\times 5=120.}" loading="lazy"></span></dd></dl>
<p>The anonymous function here is the multiplication of the two arguments.
</p><p>A fold does not necessarily produce a single scalar value; it can also generate structured results such as lists. Instead, both map and filter can be created using fold. In map, the value that is accumulated is a new list, containing the results of applying a function to each element of the original list. In filter, the value that is accumulated is a new list containing only those elements that match the given condition.
</p>
<div class="mw-heading mw-heading2"><h2 id="List_of_languages">List of languages</h2></div>
<p>The following is a list of <a href="Programming_language" title="Programming language">programming languages</a> that support unnamed anonymous functions fully, or partly as some variant, or not at all.
</p><p>The following table illustrates several common patterns. Notably, languages like <a href="C_(programming_language)" title="C (programming language)">C</a>, <a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>, and <a href="Object_Pascal" title="Object Pascal">Object Pascal</a>—which traditionally do not support anonymous functions—are all <a href="Statically_typed" class="mw-redirect" title="Statically typed">statically typed</a> languages. However, statically typed languages can support anonymous functions. For example, the <a href="ML_(programming_language)" title="ML (programming language)">ML</a> languages are statically typed and fundamentally include anonymous functions, and <a href="Delphi_(programming_language)" class="mw-redirect" title="Delphi (programming language)">Delphi</a>, a dialect of <a href="Object_Pascal" title="Object Pascal">Object Pascal</a>, has been extended to support anonymous functions, as has <a href="C%2B%2B" title="C++">C++</a> (by the <a href="C%2B%2B11" title="C++11">C++11</a> standard). Second, the languages that treat functions as <a href="First-class_function" title="First-class function">first-class functions</a> (<a href="Dylan_(programming_language)" title="Dylan (programming language)">Dylan</a>, <a href="Haskell_(programming_language)" class="mw-redirect" title="Haskell (programming language)">Haskell</a>, <a href="JavaScript" title="JavaScript">JavaScript</a>, <a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a>, <a href="ML_(programming_language)" title="ML (programming language)">ML</a>, <a href="Perl" title="Perl">Perl</a>, <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a>, <a href="Scheme_(programming_language)" title="Scheme (programming language)">Scheme</a>) generally have anonymous function support so that functions can be defined and passed around as easily as other data types.
</p>
<style data-mw-deduplicate="TemplateStyles:r1304669348">
/* start https://en.wikipedia.org/ */
@media screen and (min-width:640px){.mw-parser-output .sticky-header>thead>tr:first-child,.mw-parser-output .sticky-header>caption+tbody>tr:first-child,.mw-parser-output .sticky-header>tbody:first-child>tr:first-child,.mw-parser-output .sticky-header-multi>thead{position:sticky;top:0;z-index:10}body.skin-timeless .mw-parser-output .content-table-wrapper.overflowed .sticky-header>thead>tr:first-child,body.skin-timeless .mw-parser-output .content-table-wrapper.overflowed .sticky-header>caption+tbody>tr:first-child,body.skin-timeless .mw-parser-output .content-table-wrapper.overflowed .sticky-header>tbody:first-child>tr:first-child,body.skin-timeless .mw-parser-output .content-table-wrapper.overflowed .sticky-header-multi>thead{position:static}.mw-parser-output .sticky-header:not(.wikitable),.mw-parser-output .sticky-header-multi:not(.wikitable){background-color:var(--color-inverted,#fff)}.mw-parser-output .sticky-header:not(.wikitable)>*,.mw-parser-output .sticky-header:not(.wikitable)>thead>tr:first-child,.mw-parser-output .sticky-header:not(.wikitable)>caption+tbody>tr:first-child,.mw-parser-output .sticky-header:not(.wikitable)>tbody:first-child>tr:first-child,.mw-parser-output .sticky-header-multi:not(.wikitable)>thead,.mw-parser-output .sticky-header-multi>thead{background-color:inherit}.mw-parser-output .sticky-header.wikitable,.mw-parser-output .sticky-header-multi.wikitable{border-collapse:separate;border-spacing:0;border-width:0 1px 1px 0}.mw-parser-output .sticky-header.wikitable td,.mw-parser-output .sticky-header.wikitable th,.mw-parser-output .sticky-header-multi.wikitable td,.mw-parser-output .sticky-header-multi.wikitable th{border-width:1px 0 0 1px}body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header.wikitable,body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header-multi.wikitable{border-bottom-width:0.2em;padding:0}.mw-parser-output .sticky-header.static-row-numbers.wikitable tr::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable tr::before{border-left-width:1px}.mw-parser-output .sticky-header.static-row-numbers.wikitable>thead>tr:first-child::before,.mw-parser-output .sticky-header.static-row-numbers.wikitable>caption+tbody>tr:first-child::before,.mw-parser-output .sticky-header.static-row-numbers.wikitable>tbody:first-child>tr:first-child::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable>thead>tr:first-child::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable>caption+tbody>tr:first-child::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable>tbody:first-child>tr:first-child::before,.mw-parser-output .sticky-header.static-row-numbers.wikitable .sortbottom::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable .sortbottom::before{border-top-width:1px}.mw-parser-output .sticky-header.static-row-numbers.wikitable .sortbottom~.sortbottom::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable .sortbottom~.sortbottom::before{border-top-width:0}.mw-parser-output .sticky-header.static-row-numbers.wikitable>tbody:first-of-type>tr:not(.static-row-header)::before,.mw-parser-output .sticky-header-multi.static-row-numbers.wikitable>tbody:first-of-type>tr:not(.static-row-header)::before{border-bottom-width:0;border-right-width:0}body.skin-timeless .mw-parser-output .content-table-wrapper.overflowed .sticky-header.wikitable,body.skin-timeless .mw-parser-output .content-table-wrapper.overflowed .sticky-header-multi.wikitable{border-collapse:collapse;border-width:1px}}@media screen and (min-width:1120px){body.vector-sticky-header-visible .mw-parser-output .sticky-header>thead>tr:first-child,body.vector-sticky-header-visible .mw-parser-output .sticky-header>caption+tbody>tr:first-child,body.vector-sticky-header-visible .mw-parser-output .sticky-header>tbody:first-child>tr:first-child,body.vector-sticky-header-visible .mw-parser-output .sticky-header-multi>thead{top:3.125rem}}@media screen and (min-width:851px){body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header>thead>tr:first-child,body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header>caption+tbody>tr:first-child,body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header>tbody:first-child>tr:first-child,body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header-multi>thead{top:3.51em}}@media screen{.mw-parser-output .sticky-header.jquery-tablesorter>thead,.mw-parser-output .sticky-header.mw-sticky-header>thead{position:static;top:auto;z-index:auto}.mw-parser-output .sticky-header.jquery-tablesorter>tfoot,.mw-parser-output .sticky-header.mw-sticky-header>tfoot,.mw-parser-output .sticky-header-multi.jquery-tablesorter>tfoot,.mw-parser-output .sticky-header-multi.mw-sticky-header>tfoot{position:static;bottom:auto;z-index:auto}}@media screen and (min-width:1120px){body.skin-vector-2022.vector-sticky-header-visible .mw-parser-output .sticky-header.jquery-tablesorter>thead{top:auto}html.client-js.vector-sticky-header-enabled .mw-parser-output .sticky-header .mw-sticky-header-element{top:auto!important}}@media screen and (min-width:851px){body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header.jquery-tablesorter>thead,body.skin-timeless .mw-parser-output .content-table-wrapper:not(.overflowed) .sticky-header.mw-sticky-header>thead{top:auto}}
/* end https://en.wikipedia.org/ */
</style>
<table class="sortable wikitable sticky-header" style="text-align: left; font-size: 0.92em;">
<caption>List of languages
</caption>
<tbody><tr>
<th>Language</th>
<th>Support</th>
<th>Notes
</th></tr>
<tr>
<td><a href="ActionScript" title="ActionScript">ActionScript</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a>
</td>
<td style="background:#FFB; color:black;vertical-align:middle;text-align:center;" class="table-partial"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Expression functions are a part of Ada2012, access-to-subprogram<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="ALGOL_68" title="ALGOL 68">ALGOL 68</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="APL_(programming_language)" title="APL (programming language)">APL</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Dyalog, ngn and dzaima APL fully support both dfns and tacit functions. GNU APL has rather limited support for dfns.
</td></tr>
<tr>
<td><a href="Assembly_language" title="Assembly language">Assembly languages</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="AutoHotkey" title="AutoHotkey">AHK</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Since AutoHotkey V2 anonymous functions are supported with a syntax similar to JavaScript.
</td></tr>
<tr>
<td><a href="Bash_(Unix_shell)" title="Bash (Unix shell)">Bash</a>
</td>
<td style="background:#FFB; color:black;vertical-align:middle;text-align:center;" class="table-partial"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>A library has been made to support anonymous functions in Bash.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="C_(programming_language)" title="C (programming language)">C</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>Support is provided in <a href="Clang" title="Clang">Clang</a> and along with the <a href="LLVM" title="LLVM">LLVM</a> compiler-rt lib. GCC support is given for a macro implementation which enables the possibility of use. See <a href="#Examples_of_anonymous_functions">below</a> for more details.
</td></tr>
<tr>
<td><a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="C%2B%2B" title="C++">C++</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>As of the <a href="C%2B%2B11" title="C++11">C++11</a> standard
</td></tr>
<tr>
<td><a href="ColdFusion_Markup_Language" title="ColdFusion Markup Language">CFML</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>As of <a href="Railo" title="Railo">Railo</a> 4,<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> <a href="ColdFusion" class="mw-redirect" title="ColdFusion">ColdFusion</a> 10<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Clojure" title="Clojure">Clojure</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="COBOL" title="COBOL">COBOL</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td><a href="Micro_Focus" title="Micro Focus">Micro Focus</a>'s non-standard Managed COBOL dialect supports lambdas, which are called anonymous delegates/methods.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Curl_(programming_language)" title="Curl (programming language)">Curl</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="D_(programming_language)" title="D (programming language)">D</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Dart_(programming_language)" title="Dart (programming language)">Dart</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:0_12-0" class="reference"><a href="#cite_note-:0-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Delphi_(programming_language)" class="mw-redirect" title="Delphi (programming language)">Delphi</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Dylan_(programming_language)" title="Dylan (programming language)">Dylan</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Eiffel_(programming_language)" title="Eiffel (programming language)">Eiffel</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Elm_(programming_language)" title="Elm (programming language)">Elm</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Elixir_(programming_language)" title="Elixir (programming language)">Elixir</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:1_16-0" class="reference"><a href="#cite_note-:1-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Erlang_(programming_language)" title="Erlang (programming language)">Erlang</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:2_17-0" class="reference"><a href="#cite_note-:2-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:3_18-0" class="reference"><a href="#cite_note-:3-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Microsoft_Excel" title="Microsoft Excel">Excel</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Excel worksheet function, 2021 beta release<sup id="cite_ref-Microsoft_Excel_Blog_2021-01-25_19-0" class="reference"><a href="#cite_note-Microsoft_Excel_Blog_2021-01-25-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Factor_(programming_language)" title="Factor (programming language)">Factor</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>"Quotations" support this<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Fortran" title="Fortran">Fortran</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Frink_(programming_language)" title="Frink (programming language)">Frink</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Go_(programming_language)" title="Go (programming language)">Go</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:4_22-0" class="reference"><a href="#cite_note-:4-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Gosu_(programming_language)" title="Gosu (programming language)">Gosu</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Groovy_(programming_language)" class="mw-redirect" title="Groovy (programming language)">Groovy</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Haskell_(programming_language)" class="mw-redirect" title="Haskell (programming language)">Haskell</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Haxe" title="Haxe">Haxe</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Java_(programming_language)" title="Java (programming language)">Java</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Supported since <a href="Java_8" class="mw-redirect" title="Java 8">Java 8</a>.
</td></tr>
<tr>
<td><a href="JavaScript" title="JavaScript">JavaScript</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Julia_(programming_language)" title="Julia (programming language)">Julia</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Kotlin_(programming_language)" title="Kotlin (programming language)">Kotlin</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Lisp_(programming_language)" title="Lisp (programming language)">Lisp</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Logtalk" title="Logtalk">Logtalk</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Lua_(programming_language)" class="mw-redirect" title="Lua (programming language)">Lua</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="MUMPS_(programming_language)" class="mw-redirect" title="MUMPS (programming language)">MUMPS</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Maple_(software)" title="Maple (software)">Maple</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="MATLAB" title="MATLAB">MATLAB</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Maxima_(software)" title="Maxima (software)">Maxima</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Nim_(programming_language)" title="Nim (programming language)">Nim</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-auto1_34-0" class="reference"><a href="#cite_note-auto1-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="OCaml" title="OCaml">OCaml</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="GNU_Octave" title="GNU Octave">Octave</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Object_Pascal" title="Object Pascal">Object Pascal</a>
</td>
<td style="background:#FFB; color:black;vertical-align:middle;text-align:center;" class="table-partial"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Delphi, a dialect of Object Pascal, supports anonymous functions (formally, <i>anonymous methods</i>) natively since Delphi 2009. The <a href="Oxygene_(programming_language)" title="Oxygene (programming language)">Oxygene</a> Object Pascal dialect also supports them.
</td></tr>
<tr>
<td><a href="Objective-C" title="Objective-C">Objective-C</a> (Mac OS X 10.6+)
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Called <a href="Blocks_(C_language_extension)" title="Blocks (C language extension)">blocks</a>; in addition to Objective-C, blocks can also be used on C and C++ when programming on Apple's platform.
</td></tr>
<tr>
<td><a href="OpenSCAD" title="OpenSCAD">OpenSCAD</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Function Literal support was introduced with version 2021.01.<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Perl" title="Perl">Perl</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:5_38-0" class="reference"><a href="#cite_note-:5-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="PHP" title="PHP">PHP</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>As of PHP 5.3.0, true anonymous functions are supported.<sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup> Formerly, only partial anonymous functions were supported, which worked much like C#'s implementation.
</td></tr>
<tr>
<td><a href="PL/I" title="PL/I">PL/I</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Python_(programming_language)" title="Python (programming language)">Python</a>
</td>
<td style="background:#FFB; color:black;vertical-align:middle;text-align:center;" class="table-partial"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Python supports anonymous functions through the lambda syntax,<sup id="cite_ref-:6_40-0" class="reference"><a href="#cite_note-:6-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup> which supports only expressions, not statements.
</td></tr>
<tr>
<td><a href="R_(programming_language)" title="R (programming language)">R</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Racket_(programming_language)" title="Racket (programming language)">Racket</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Raku_(programming_language)" title="Raku (programming language)">Raku</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Rexx" title="Rexx">Rexx</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="IBM_RPG" title="IBM RPG">RPG</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Ruby's anonymous functions, inherited from <a href="Smalltalk" title="Smalltalk">Smalltalk</a>, are called <a href="Ruby_(programming_language)#Blocks_and_iterators" title="Ruby (programming language)">blocks</a>.<sup id="cite_ref-:10_43-0" class="reference"><a href="#cite_note-:10-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Rust_(programming_language)" title="Rust (programming language)">Rust</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Scala_(programming_language)" title="Scala (programming language)">Scala</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Scheme_(programming_language)" title="Scheme (programming language)">Scheme</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>
</td></tr>
<tr>
<td><a href="Smalltalk" title="Smalltalk">Smalltalk</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Smalltalk's anonymous functions are called <a href="Smalltalk#Code_blocks" title="Smalltalk">blocks</a>.
</td></tr>
<tr>
<td><a href="Standard_ML" title="Standard ML">Standard ML</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Swift_(programming_language)" title="Swift (programming language)">Swift</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td>Swift's anonymous functions are called Closures.<sup id="cite_ref-:9_47-0" class="reference"><a href="#cite_note-:9-47"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="TypeScript" title="TypeScript">TypeScript</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">[</span>48<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td>Typst
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">[</span>49<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Tcl" title="Tcl">Tcl</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:7_50-0" class="reference"><a href="#cite_note-:7-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Vala_(programming_language)" title="Vala (programming language)">Vala</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:7_50-1" class="reference"><a href="#cite_note-:7-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Visual_Basic_.NET" class="mw-redirect" title="Visual Basic .NET">Visual Basic .NET</a> v9
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-51" class="reference"><a href="#cite_note-51"><span class="cite-bracket">[</span>51<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Visual_Prolog" title="Visual Prolog">Visual Prolog</a> v 7.2
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-52" class="reference"><a href="#cite_note-52"><span class="cite-bracket">[</span>52<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Wolfram_Language" title="Wolfram Language">Wolfram Language</a>
</td>
<td style="background:#9EFF9E;color:black;vertical-align:middle;text-align:center;" class="table-yes"><span typeof="mw:File"><span></span></span><span style="display:none">Y</span>
</td>
<td><sup id="cite_ref-:8_53-0" class="reference"><a href="#cite_note-:8-53"><span class="cite-bracket">[</span>53<span class="cite-bracket">]</span></a></sup>
</td></tr>
<tr>
<td><a href="Zig_(programming_language)" title="Zig (programming language)"> Zig</a>
</td>
<td style="background:#FFC7C7;color:black;vertical-align:middle;text-align:center;" class="table-no"><span typeof="mw:File"><span></span></span><span style="display: none;">N</span>
</td>
<td><sup id="cite_ref-54" class="reference"><a href="#cite_note-54"><span class="cite-bracket">[</span>54<span class="cite-bracket">]</span></a></sup>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Examples_of_anonymous_functions">Examples of anonymous functions</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Examples_of_anonymous_functions" title="Examples of anonymous functions">Examples of anonymous functions</a></div>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1266661725">
/* start https://en.wikipedia.org/ */
.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}
/* end https://en.wikipedia.org/ */
</style>
<ul><li><a href="First-class_function" title="First-class function">First-class function</a></li>
<li><a href="Lambda_calculus_definition" title="Lambda calculus definition">Lambda calculus definition</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://learnyouahaskell.com/higher-order-functions">"Higher order functions"</a>. learnyouahaskell.com<span class="reference-accessdate">. Retrieved <span class="nowrap">3 December</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite id="CITEREFFernandez2009" class="citation cs2">Fernandez, Maribel (2009), <a rel="nofollow" class="external text" href="https://books.google.com/books?id=FPFsnzzebhQC&pg=PA33"><i>Models of Computation: An Introduction to Computability Theory</i></a>, Undergraduate Topics in Computer Science, Springer Science & Business Media, p. 33, <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>9781848824348</bdi>, <q>The Lambda calculus ... was introduced by Alonzo Church in the 1930s as a precise notation for a theory of anonymous functions</q></cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">"Arrow function expressions - JavaScript"</a>. <i>MDN</i><span class="reference-accessdate">. Retrieved <span class="nowrap">August 21,</span> 2019</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.adaic.org/resources/add_content/standards/05rm/html/RM-3-10.html#S0082">"Access Types"</a>. <i>www.adaic.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-06-27</span></span>.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/spencertipping/bash-lambda">"Bash lambda"</a>. <i><a href="GitHub" title="GitHub">GitHub</a></i>. 2019-03-08.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite id="CITEREFBillWagner" class="citation web cs1">BillWagner. <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions">"Lambda expressions - C# reference"</a>. <i>docs.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140106031957/http://www.getrailo.org/index.cfm/whats-up/railo-40-beta-released/features/closures/">"Closure support"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.getrailo.org/index.cfm/whats-up/railo-40-beta-released/features/closures/">the original</a> on 2014-01-06<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-01-05</span></span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20140106032853/https://learn.adobe.com/wiki/display/coldfusionen/Whats+new+in+ColdFusion+10">"Whats new in ColdFusion 10"</a>. Archived from <a rel="nofollow" class="external text" href="https://learn.adobe.com/wiki/display/coldfusionen/Whats+new+in+ColdFusion+10">the original</a> on 2014-01-06<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-01-05</span></span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://clojure.org/guides/higher_order_functions">"Clojure - Higher Order Functions"</a>. <i>clojure.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://archive.today/20140225190401/http://documentation.microfocus.com/help/topic/com.microfocus.eclipse.infocenter.visualcobol.vs/GUID-DA75663F-6357-4064-8112-C87E7457DE51.html">"Managed COBOL Reference"</a>. <i>Micro Focus Documentation</i>. <a href="Micro_Focus" title="Micro Focus">Micro Focus</a>. Archived from <a rel="nofollow" class="external text" href="http://documentation.microfocus.com/help/topic/com.microfocus.eclipse.infocenter.visualcobol.vs/GUID-DA75663F-6357-4064-8112-C87E7457DE51.html">the original</a> on 25 February 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">25 February</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dlang.org/spec/function.html">"Functions - D Programming Language"</a>. <i>dlang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-:0-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-:0_12-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dart.dev/guides/language/language-tour">"A tour of the Dart language"</a>. <i>dart.dev</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docwiki.embarcadero.com/RADStudio/Sydney/en/Anonymous_Methods_in_Delphi#:~:text=As%20the%20name%20suggests,%20an,a%20parameter%20to%20a%20method.">"Anonymous Methods in Delphi - RAD Studio"</a>. <i>docwiki.embarcadero.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://opendylan.org/books/dpg/func.html">"Functions — Dylan Programming"</a>. <i>opendylan.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://elm-lang.org/docs/syntax">"docs/syntax"</a>. <i>elm-lang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-:1-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-:1_16-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://elixir-lang.org/crash-course.html">"Erlang/Elixir Syntax: A Crash Course"</a>. <i>elixir-lang.github.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-:2-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-:2_17-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://erlang.org/doc/programming_examples/funs.html">"Erlang -- Funs"</a>. <i>erlang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-:3-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-:3_18-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFcartermp" class="citation web cs1">cartermp. <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword">"Lambda Expressions: The fun Keyword - F#"</a>. <i>docs.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-Microsoft_Excel_Blog_2021-01-25-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-Microsoft_Excel_Blog_2021-01-25_19-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.microsoft.com/en-us/research/blog/lambda-the-ultimatae-excel-worksheet-function/">"LAMBDA: The ultimate Excel worksheet function"</a>. <i>microsoft.com</i>. 25 January 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">2021-03-30</span></span>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.factorcode.org/content/article-quotations.html">"Quotations - Factor Documentation"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">26 December</span> 2015</span>. <q>A quotation is an anonymous function (a value denoting a snippet of code) which can be used as a value and called using the Fundamental combinators.</q></cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://frinklang.org/">"Frink"</a>. <i>frinklang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-:4-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-:4_22-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://golangdocs.com/anonymous-functions-in-golang">"Anonymous Functions in GoLang"</a>. <i>GoLang Docs</i>. 9 January 2020<span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://gosu-lang.org/doc/pdf/gosuref.pdf">"Gosu Documentation"</a> <span class="cs1-format">(PDF)</span><span class="reference-accessdate">. Retrieved <span class="nowrap">4 March</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20120522213410/http://groovy.codehaus.org/Closures">"Groovy Documentation"</a>. Archived from <a rel="nofollow" class="external text" href="http://groovy.codehaus.org/Closures">the original</a> on 22 May 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">29 May</span> 2012</span>.</cite></span>
</li>
<li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wiki.haskell.org/Anonymous_function">"Anonymous function - HaskellWiki"</a>. <i>wiki.haskell.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://haxe.org/manual/std-Lambda.html">"Lambda"</a>. <i>Haxe - The Cross-platform Toolkit</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions">"Functions - JavaScript | MDN"</a>. <i>developer.mozilla.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.julialang.org/en/v1/manual/functions/">"Functions · The Julia Language"</a>. <i>docs.julialang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://kotlinlang.org/docs/reference/lambdas.html">"Higher-Order Functions and Lambdas - Kotlin Programming Language"</a>. <i>Kotlin</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.lua.org/pil/6.html">"Programming in Lua : 6"</a>. <i>www.lua.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.maplesoft.com/applications/view.aspx?sid=1522&view=html">"Maple Programming: 1.6: Anonymous functions and expressions - Application Center"</a>. <i>www.maplesoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.mathworks.com/help/matlab/matlab_prog/anonymous-functions.html">"Anonymous Functions - MATLAB & Simulink"</a>. <i>www.mathworks.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://maths.cnam.fr/Membres/wilk/MathMax/help/Maxima/maxima_39.html#:~:text=Maxima%20simplifies%20funmake%20%27s%20return%20value.&text=Defines%20and%20returns%20a%20lambda,of%20the%20function%20is%20expr_n%20.">"Maxima 5.17.1 Manual: 39. Function Definition"</a>. <i>maths.cnam.fr</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-auto1-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-auto1_34-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://nim-lang.github.io/Nim/manual.html#procedures-anonymous-procs">"Nim Manual"</a>. <i>nim-lang.github.io</i>.</cite></span>
</li>
<li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://ocaml.org/learn/taste.html">"Code Examples – OCaml"</a>. <i>ocaml.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://octave.org/doc/v4.0.1/Anonymous-Functions.html">"GNU Octave: Anonymous Functions"</a>. <i>octave.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a class="external text external" href="https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules#Function_Literals">"Function Literals"</a>. <i>OpenSCAD User Manual</i>. Wikibooks<span class="reference-accessdate">. Retrieved <span class="nowrap">22 February</span> 2021</span>.</cite></span>
</li>
<li id="cite_note-:5-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-:5_38-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://perldoc.perl.org/perlsub">"perlsub - Perl subroutines - Perldoc Browser"</a>. <i>perldoc.perl.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.php.net/manual/en/functions.anonymous.php">"PHP: Anonymous functions - Manual"</a>. <i>www.php.net</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-:6-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-:6_40-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/3/reference/expressions.html">"6. Expressions — Python 3.9.0 documentation"</a>. <i>docs.python.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.racket-lang.org/guide/lambda.html">"4.4 Functions: lambda"</a>. <i>docs.racket-lang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.raku.org/language/functions">"Functions"</a>. <i>docs.raku.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-:10-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-:10_43-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFSosinski2008" class="citation web cs1">Sosinski, Robert (2008-12-21). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20140531123646/http://www.reactive.io/tips/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/">"Understanding Ruby Blocks, Procs and Lambdas"</a>. Reactive.IO. Archived from <a rel="nofollow" class="external text" href="http://www.reactive.io/tips/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/">the original</a> on 2014-05-31<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-05-30</span></span>.</cite></span>
</li>
<li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://doc.rust-lang.org/book/ch13-01-closures.html">"Closures: Anonymous Functions that Can Capture Their Environment - The Rust Programming Language"</a>. <i>doc.rust-lang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-45">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.scala-lang.org/overviews/scala-book/anonymous-functions.html">"Anonymous Functions"</a>. <i>Scala Documentation</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.cs.cornell.edu/courses/cs312/2008sp/recitations/rec03.html">"Recitation 3: Higher order functions"</a>. <i>www.cs.cornell.edu</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-:9-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-:9_47-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.swift.org/swift-book/LanguageGuide/Closures.html">"Closures — The Swift Programming Language (Swift 5.5)"</a>. <i>docs.swift.org</i>.</cite></span>
</li>
<li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html">"Documentation - Everyday Types"</a>. <i>www.typescriptlang.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-49">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://typst.app/docs/reference/foundations/function/#unnamed">"Function Type - Typst Documentation"</a>. <i>typst.app</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2024-09-10</span></span>.</cite></span>
</li>
<li id="cite_note-:7-50"><span class="mw-cite-backlink">^ <a href="#cite_ref-:7_50-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:7_50-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wiki.gnome.org/Projects/Vala/Tutorial">"Projects/Vala/Tutorial - GNOME Wiki!"</a>. <i>wiki.gnome.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2020-11-24</span></span>.</cite></span>
</li>
<li id="cite_note-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-51">^</a></b></span> <span class="reference-text"><cite id="CITEREFKathleenDollard2021" class="citation web cs1">KathleenDollard (15 September 2021). <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/lambda-expressions">"Lambda Expressions - Visual Basic"</a>. <i>docs.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-52"><span class="mw-cite-backlink"><b><a href="#cite_ref-52">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Terms/Anonymous_Predicates">"Language Reference/Terms/Anonymous Predicates - wiki.visual-prolog.com"</a>. <i>wiki.visual-prolog.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-:8-53"><span class="mw-cite-backlink"><b><a href="#cite_ref-:8_53-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.wolfram.com/language/elementary-introduction/2nd-ed/26-pure-anonymous-functions.html.en">"Pure Anonymous Function: Elementary Introduction to the Wolfram Language"</a>. <i>www.wolfram.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-01-14</span></span>.</cite></span>
</li>
<li id="cite_note-54"><span class="mw-cite-backlink"><b><a href="#cite_ref-54">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/ziglang/zig/issues/1048">"Lambdas, Closures and everything in between · Issue #1048 · ziglang/zig"</a>. <i>GitHub</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-08-21</span></span>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://www.deltics.co.nz/blog/?p=48">Anonymous Methods - When Should They Be Used?</a> (blog about anonymous function in Delphi)</li>
<li><a rel="nofollow" class="external text" href="http://www.takipiblog.com/2014/01/16/compiling-lambda-expressions-scala-vs-java-8/">Compiling Lambda Expressions: Scala vs. Java 8</a></li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20160308090330/http://webwidetutor.com/php/php-anonymous-functions-?id=12">php anonymous functions</a> php anonymous functions</li>
<li><a rel="nofollow" class="external text" href="http://dobegin.com/lambda-functions-everywhere/">Lambda functions in various programming languages</a></li>
<li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20230314153037/https://learngolangonline.com/functions">Functions in Go</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-14" href="https://en.wikipedia.org/wiki/?title=Anonymous_function&oldid=1300413667">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>